﻿using System;
using System.ComponentModel;
using System.Drawing;
using System.Xml.Serialization;
using CodeSnippet.Options;
using CodeSnippet.Properties;
using WLWPluginBase.Win32;

namespace CodeSnippet.Config
{
    /// <summary>
    /// Layout section of the Code Snippet plugin configuration.
    /// </summary>
    [DefaultProperty("SectionName")]
    public class LayoutConfig : IConfigSection
    {
        #region Properties
        /// <summary>
        /// Gets the name of the section.
        /// </summary>
        /// <value>The name of the section.</value>
        [LocalizedCategory("CategoryAttribute_Attributes"), LocalizedDisplayName("DisplayNameAttribute_SectionName"), LocalizedDescription("DescriptionAttribute_SectionName"), XmlIgnore]
        public string SectionName
        {
            get { return Resources.ConfigSectionName_Layout; }
        }
        /// <summary>
        /// Gets the image.
        /// </summary>
        /// <value>The image.</value>
        [Browsable(false), XmlIgnore]
        public Bitmap Image
        {
            get { return Resources.layout; }
        }
        /// <summary>
        /// Details about the last window location and dimensions when in Full mode.
        /// </summary>
        [Browsable(false), CLSCompliant(false)]
        public Win32Structures.WINDOWPLACEMENT FullModePlacement { get; set; }
        /// <summary>
        /// Details about the last window location and dimensions when in Compact mode.
        /// </summary>
        [Browsable(false), CLSCompliant(false)]
        public Win32Structures.WINDOWPLACEMENT CompactModePlacement { get; set; }
        /// <summary>
        /// Details about the last window location and dimensions of the Options dialog.
        /// </summary>
        /// <value>The options placement.</value>
        [Browsable(false), CLSCompliant(false)]
        public Win32Structures.WINDOWPLACEMENT OptionsPlacement { get; set; }
        #endregion Properties

        #region Initialization
        /// <summary>
        /// Initializes a new instance of the <see cref="LayoutConfig"/> class.
        /// </summary>
        public LayoutConfig()
        {
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="LayoutConfig"/> class.
        /// </summary>
        /// <param name="copy">The copy.</param>
        public LayoutConfig(LayoutConfig copy)
        {
            FullModePlacement = copy.FullModePlacement;
            CompactModePlacement = copy.CompactModePlacement;
            OptionsPlacement = copy.OptionsPlacement;
        }
        #endregion Initialization
    }
}
